This invention concerns data processing. More particularly the invention concerns detection of sync patterns such as those used for reading media such as CD and DVD discs.
A digital data stream from an optical storage device contains a unique binary pattern that appears at a predetermined interval within the digital bit stream. This pattern is called a sync pattern. Sync patterns are used on various forms of digital media, including CD (compact disc) and DVD formats. CD formats include CD-ROM, CD-audio, CD-R (CD write once) and CD-RW. The ability to detect the sync pattern within the serial bit stream is required in order to recover the original data encoded on the storage media. The problem is that there may be dirt or other foreign material such as fingerprints, organic or inorganic substances. Additionally, there may be scratches on the media or defects stamped in the media during manufacturing that alter the data that is read. The presence of such interfering alterations can damage the sync pattern and/or cause the sync pattern to appear earlier or later than expected within the bit stream. If the sync pattern cannot be detected, data synchronization may be temporarily lost, resulting in elevated data error rates prior to data demodulation and correction.
Sync detect circuits typically use one or two state machines for detecting and maintaining data synchronization. In typical implementations, a sync window is used when looking for the sync pattern. Once a valid sync pattern is found, the sync detect logic will not begin looking for the next sync pattern until the start of the sync window. This method prevents the sync detect logic from triggering on false sync patterns that may appear within the data stream due to corrupted data. The sync window is typical 2N+1 bits wide, centered around the ideal distance from the last sync found. If the sync pattern appears N bits too soon or N bits too late, it will still be detected and the data following the sync pattern can be demodulated correctly.
If the data from the media is very corrupted or the read channel is poorly designed, the sync pattern will be shifted too far away from the ideal, fall outside the sync window, and be missed. For large defects, the shift can be very large (100 or more bits). This prevents the normal sync window method from ever seeing the sync after the defect, resulting in unreadable data.
This invention allows data to be read from a disc even if there are large shifts or jumps from sync to sync that could be caused by a large defect. This allows data to be read which would otherwise been unrecoverable.
In the prior art, it is known to use a narrow sync window and use the first sync found in a CD-DSP implementation. Typically, the narrow sync window is less than +/xe2x88x9214 bits. Such implementations did not provide for large jumps in sync position that would allow data to be read correctly.
According to the present invention, a determination of a requirement for a sync jump is recognized when a detected sync position deviates from an expected position by a predetermined amount. If the requirement exists, a different state machine is used to detect a new sync pattern. When such a requirement for a sync jump is detected, a determination is made as to which direction a sync jump should be effected. After the determination is made, the jump is effected.
According to one aspect of the invention, the determination is made for a data stream which utilizes sync signals. According to a specific embodiment of the present invention, the determination is made when reading disc media, which in a particular embodiment is disc media which in some instances conforms to the DVD format. According to a preferred embodiment of the invention, the determination is made for disc media which conforms to the DVD format and may also for disc media which conforms to the CD format. Specifically, according to that preferred embodiment of the invention, the DVD format conformed to includes 1488 data bits per frame and the CD format includes 588 data bits per frame.
According to one particular embodiment of the present invention, the direction of the jump is made by determining a direction which results in the smallest jump. According to an alternate embodiment of the present invention, an internal time base or clock is used to measure a read clock (RCLK) speed before a jump when the sync pattern is within the window. A second read clock speed measurement is made as a search for a new sync sequence. The direction of the jump is determined by comparing the two measurements. If the jump is effected in a forward direction, a pointer is moved accrodingly and the new sync pattern is adopted. According to one embodiment of the invention, if the jump is determined to be performed as a backwards jump, a pointer is moved accordingly. According to an alternate embodiment of the invention, if the jump is determined to be performed as a backwards jump, data is temporarily stopped from being sent downstream for demodulation. When the new data point is equal to a corresponding point in the old data prior to the jump, data is allowed to be sent downstream for demodulation.
xe2x80x9cPointerxe2x80x9d is intended to refer to a reference location in a data stream which indicates position within a sync frame.
According to the present invention, a sync detect circuit uses an additional state machine and other logic to handle sync detection when there are large jumps or gaps in the data stream typically caused by defects. A master state machine, the Sync Control State Machine, is used to perform the initial search for sync patterns and sync sequences and to maintain synchronization once it has been established. The second state machine, the Sync Jump State Machine, is responsible for handling any cases where a defect causes a large jump in the sync sequence, i.e., the sync patterns begin to fall outside of the sync window.
The Sync Control state machine starts in an Idle state. When read channel data enters the system, Sync Control enters the Sync Sequence Validation state. This state used to verify that the sync patterns have the expected spacing between them. For a bit stream from DVD media, this state is also used to determine if the sync patterns are in the expected numerical order. Once sync validation is complete, Sync Control transitions to the next state. For DVD media, this would be the ECC Block Validation state where the start of an ECC block is determined. The ECC Block Validation state is skipped for CD media. The last Sync Control state is called Data Acquisition. In this state the sync detect engine is able to identify the sync patterns and transfer this information, along with the actual bit stream, to the demodulator.
At this point, the second state machine, Sync Jump, begins to monitor the sync error rate. If an exact sync pattern cannot be found within the sync window during Data Acquisition state, it could be an example of a small bit error or an indication that a defect has caused the sync patterns to begin falling outside of the sync window. The former case will correct itself when the next (good) sync pattern is detected. In the later case however, synchronization will never be re-established on its own. The sync patterns would continue to fall outside the sync window and data would be unrecoverable. In a typical system today, the Sync Control state machine would drop out of sync lock and start the sync search process over again. This would cause the data to be unreadable. The gap in data could be ignored or an attempt to re-read (re-seek) could be made. With the Sync Jump state machine in place, Sync Control can continue to output data and sync to the demodulator. At the same time, the Sync Jump state machine begins looking for a new sync sequence using a similar process that Sync Control used. If Sync Jump can quickly find and validate a sync sequence outside the current sync window, the sync window can be moved to the new location (i.e., a sync jump takes place) without affecting the readability of the after error correction.
A problem occurs when moving the sync window position. The demodulator or error correction logic beyond the sync detection logic must be informed that a sync jump is taking place. Sync detection must determine the direction of the sync jump too. During the defect, it is possible that the clock to data relationship caused a jump forward in time or backward in time. This direction and the new location must be passed on to the other logic in the system for the seamless data recovery to be possible. A jump forward in time causes a small loss of data that will have to be replaced at error correction time. A jump backward can be handled in two different methods: a) inform the other logic that a backward jump has occurred and the data for the current area will be repeated; b) temporarily stop sending data to the other logic until the data in the incoming bit stream has caught up to the point within the data that has already been transmitted to the other logic.